package com.SinaMicrobloggingApi.Core.Request;

import org.apache.http.message.BasicNameValuePair;

import com.SinaMicrobloggingApi.Core.OauthConstants;
import com.SinaMicrobloggingApi.Core.Response.IResponse;

public class DirectMessagesRequest extends RequestBase {

	private static final String DirectMessages = "DirectMessages";
	private int page = 1;

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getSince_id() {
		return since_id;
	}

	public void setSince_id(int sinceId) {
		since_id = sinceId;
	}

	public int getMax_id() {
		return max_id;
	}

	public void setMax_id(int maxId) {
		max_id = maxId;
	}

	private int since_id = -1;
	private int max_id = -1;

	public DirectMessagesRequest(IResponse response, int count) {
		super(response);
		// TODO Auto-generated constructor stub
		this.count = count;
	}

	@Override
	protected String getRequestName() {
		// TODO Auto-generated method stub
		return DirectMessages;
	}

	protected String getRequestParamenters() {

		BasicNameValuePair oauth_token = new BasicNameValuePair(
				OauthConstants.OAUTH_TOKEN_KEY, getOauthToken());
		BasicNameValuePair request_count = new BasicNameValuePair("count",
				String.valueOf(count));

		oauthParamenterModels.add(oauth_token);
		oauthParamenterModels.add(request_count);

		return super.getRequestParamenters();
	}
}
